<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登录页面</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="css/student.css">
	<style type="text/css">
	#login{
    width:"962px";
    height:"450px";
    background-color:#5584DE;
    } #box{
    width:"962px";
   
    background-color:#5584DE;
    }
    </style>
	<script type="text/javascript" language="javascript">
	   function check(){
	   var loginname,pwd;
	   loginname=document.mainform.loginname.value;
       pwd=document.mainform.pwd.value;
	   if(loginname.length==0){
	      alert("用户名不能为空，请输入用户名！");  
	      return false;
	   }
	   if(pwd.length==0)
	   { 
	      alert("密码不能为空，请输入密码！");
	      return false;
	   }
	   return true;
	   }
	</script>
  </head>
  
  <body style="background-color:#f0ede4">
  <center>
  <div id="box">
  <div id="banner"></div>
  <div id="banner1"></div>
    <form name="mainform" action="login.action" method="post" onsubmit="return check();">
    	 <div id ="login">
     <table width="300" height="300" border="0" style="width: 300px; height: 228px;"> 
     <tr></tr>
       <tr><td>&nbsp;</td><td><h3><font color="#ffffff" face="楷体gb2312" size="4">用户名：</font></h3></td>
       <td><input type="text" name="loginname" id="loginname" value="" style="color=#5584DE"></td></tr>
       <tr><td>&nbsp;</td><td><h3><font color="#ffffff" face="楷体gb2312" size="4">密码:</font></h3></td>
       <td><input type="password" name="pwd" id="pwd" style="color=#5584DE"></td></tr>
        <tr><td>&nbsp;</td><td><h3><font color="#ffffff" face="楷体gb2312" size="4">角色:</font></h3></td>
        <td><select name="role" style="width=148px;color=#5584DE">
    		<option value="0">学生</option>
    		<option value="1">教师</option>
    		<option value="2">管理员</option>
    	</select></td>
    	</tr>
       <tr><td align="center" colspan="3">
       <input type="submit" name="submit" value="登录" style="border:0;width=80px;height=25px;color=#5584DE;font-weight=bold;background-color=#ffffff">
       <input type="reset" name="reset" value="重置" style="border:0;width=80px;height=25px;color=#5584DE;font-weight=bold;background-color=#ffffff">
       <input type="button" name="register" value="注册" onclick="window.location.href('regist.jsp')"
       style="text-align=center;padding-top=5px;border:0;width=80px;height=25px;color=#5584DE;font-weight=bold;background-color=#ffffff">
       </td>
       </tr>
           </table>
           </div>
    </form>
    </div>
    </center>
  </body>
  
</html>